using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class UtilAnimation
{

    private static string _animationButtonAName = "ButtonAnimation";
    public static void PlayButtonAnimation(Animation animationButtn)
    {
        animationButtn.Play(_animationButtonAName);
    }
    public static void StopButtonAnimation(Animation animationButtn)
    {
        AnimationState state = animationButtn[_animationButtonAName];
        animationButtn.Play(_animationButtonAName);
        state.time = 0;
        animationButtn.Sample();
        state.enabled = false;
        animationButtn.Stop();
    }
}
